AddressEntry Property (Recipient Object) 

The AddressEntry property specifies the AddressEntry object for this recipient. Read/write.

Syntax

objRecipient.AddressEntry

Data Type

Object (AddressEntry object)

Remarks

The AddressEntry property indicates the AddressEntry object for this recipient. For a complete description of the relationship between the AddressEntry object and the Recipient object, see Using Addresses2A0H2CP.

Accessing the AddressEntry property forces resolution of an unresolved recipient name. If the name cannot be resolved, the OLE Messaging Library reports an error. For example, when the recipient contains an empty string, the resolve operation returns MAPI_E_AMBIGUOUS_RECIP.

Example

This example compares the Address property of the Recipient object with the Address and Type properties of its child AddressEntry object, accessible through its AddressEntry property, to demonstrate the relationships between these properties.

' from the sample function Session_AddressEntry

    If objOneRecip Is Nothing Then

        MsgBox "must select a recipient"

        Exit Function

    End If

    Set objAddrEntry = objOneRecip.AddressEntry

    If objAddrEntry Is Nothing Then

        MsgBox "no valid AddressEntry for this recipient"

        Exit Function

    End If

' from the sample function Util_CompareAddressParts

    strMsg = "Recipient full address = " & objOneRecip.Address

    strMsg = strMsg & "; AddressEntry type = " & objAddrEntry.Type

    strMsg = strMsg & "; AddressEntry address = " & objAddrEntry.Address

    MsgBox strMsg    ' compare address components

    strMsg = "Recipient name = " & objOneRecip.Name

    strMsg = strMsg & "; AddressEntry name = " & objAddrEntry.Name

    MsgBox strMsg    ' compare display names (should be same)

 

See Also

AddressEntry Object